home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1997 / MacHack 1997.toast / Hacks / Hacks ’97 / Warrior’s Progress / source code / Source / Libraries / Announcer / PostponedEar.h < prev    next >
Encoding:
Text File  |  1997-06-28  |  633 b   |  35 lines  |  [TEXT/CWIE]

  1. // PostponedEar.h
  2.  
  3. #ifndef PostponedEar_h
  4. #define PostponedEar_h
  5.  
  6. #ifndef PostponedEarBase_h
  7. #include "PostponedEarBase.h"
  8. #endif
  9. #ifndef MethodOf_h
  10. #include "MethodOf.h"
  11. #endif
  12.  
  13. template < class Head >
  14. class PostponedEar: public PostponedEarBase
  15.   {
  16.     typedef Head HeadType;
  17.     typedef void (HeadType::*Nerve)();
  18.  
  19.     private:
  20.         MethodOf< Head > method;
  21.     
  22.     public:
  23.         PostponedEar( Head& head, Nerve nerve )
  24.           : PostponedEarBase( method ),
  25.              method( &head, nerve )
  26.           {}
  27.  
  28.         PostponedEar( const Announcer& announcer, Head& head, Nerve nerve )
  29.           : PostponedEarBase( method, announcer ),
  30.              method( &head, nerve )
  31.           {}
  32.   };
  33.  
  34. #endif
  35.